package com.bingxue.edu.management.education.model.req;

import com.bingxue.edu.framework.common.validation.MobilePhone;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * 创建或修改家长信息
 *
 * @author zq
 * @since 2024/08/19 00:02
 */
@Data
@Schema(description = "创建或修改家长信息")
public class ParentReq {

    @Schema(description = "姓名")
    @NotBlank(message = "姓名不能为空")
    private String name;

    @Schema(description = "手机号")
    @NotBlank(message = "家长手机号不能为空")
    @MobilePhone
    private String mobilePhone;

    @Schema(description = "推荐人")
    @Length(max = 32, message = "推荐人长度不能超过 {max} 个字符")
    private String recommender;

    @Schema(description = "用户名")
    @Length(max = 32, message = "用户名长度不能超过 {max} 个字符")
    private String username;

    @Schema(description = "用户密码")
    private String password;

    @Schema(description = "状态")
    @NotNull(message = "状态不能为空")
    private Integer status;

    @Schema(description = "备注（内部）")
    @Length(max = 255, message = "备注（内部）长度不能超过 {max} 个字符")
    private String remark;
}
